home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / lib / include / imake / sunLib.rules < prev    next >
Encoding:
Text File  |  1991-10-22  |  2.4 KB  |  88 lines

  1. XCOMM $XConsortium: sunLib.rules,v 1.6 91/03/24 17:55:58 rws Exp $
  2.  
  3. /*
  4.  * SunOS shared library rules
  5.  */
  6.  
  7. #ifndef HasSharedLibraries
  8. #define HasSharedLibraries YES
  9. #endif
  10. #ifndef SharedDataSeparation
  11. #define SharedDataSeparation YES
  12. #endif
  13. #ifndef SharedCodeDef
  14. #define SharedCodeDef -DSHAREDCODE
  15. #endif
  16. #ifndef SharedLibraryDef
  17. #define SharedLibraryDef -DSUNSHLIB
  18. #endif
  19. #ifndef ShLibIncludeFile
  20. #define ShLibIncludeFile <sunLib.tmpl>
  21. #endif
  22. #ifndef SharedLibraryLoadFlags
  23. #define SharedLibraryLoadFlags -assert pure-text
  24. #endif
  25. #ifndef PositionIndependentCFlags
  26. #define PositionIndependentCFlags -pic
  27. #endif
  28.  
  29. /*
  30.  * InstallSharedLibrary - generate rules to install the shared library.
  31.  */
  32. #ifndef InstallSharedLibrary
  33. #define    InstallSharedLibrary(libname,rev,dest)                @@\
  34. install:: Concat(lib,libname.so.rev)                     @@\
  35.     MakeDir($(DESTDIR)dest)                        @@\
  36.     $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
  37.  
  38. #endif /* InstallSharedLibrary */
  39.  
  40. /*
  41.  * InstallSharedLibraryData - generate rules to install the shared library data
  42.  */
  43. #ifndef InstallSharedLibraryData
  44. #define    InstallSharedLibraryData(libname,rev,dest)            @@\
  45. install:: Concat(lib,libname.sa.rev)                    @@\
  46.     MakeDir($(DESTDIR)dest)                        @@\
  47.     $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.sa.rev) $(DESTDIR)dest @@\
  48.     RanLibrary($(RANLIBINSTFLAGS) Concat($(DESTDIR)dest/lib,libname.sa.rev))
  49.  
  50. #endif /* InstallSharedLibraryData */
  51.  
  52. /*
  53.  * NormalSharedLibraryTarget - generate rules to create a shared library;
  54.  * build it into a different name so that the we do not hose people by having
  55.  * the library gone for long periods.
  56.  */
  57. #ifndef SharedLibraryTarget
  58. #define SharedLibraryTarget(libname,rev,solist,down,up)            @@\
  59. AllTarget(Concat(lib,libname.so.rev))                    @@\
  60.                                     @@\
  61. Concat(lib,libname.so.rev):  solist                    @@\
  62.     $(RM) $@~                            @@\
  63.     (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) solist)        @@\
  64.     $(RM) $@                             @@\
  65.     $(MV) $@~ $@                            @@\
  66.                                     @@\
  67. clean::                                    @@\
  68.     $(RM) Concat(lib,libname.so.rev)
  69.  
  70. #endif /* SharedLibraryTarget */
  71.  
  72. /*
  73.  * SharedLibraryDataTarget - generate rules to create shlib data file;
  74.  */
  75. #ifndef SharedLibraryDataTarget
  76. #define SharedLibraryDataTarget(libname,rev,salist)            @@\
  77. AllTarget(Concat(lib,libname.sa.rev))                    @@\
  78.                                     @@\
  79. Concat(lib,libname.sa.rev):  salist                    @@\
  80.     $(RM) $@                            @@\
  81.     $(AR) $@ salist                            @@\
  82.     RanLibrary($@)                            @@\
  83.                                     @@\
  84. clean::                                    @@\
  85.     $(RM) Concat(lib,libname.sa.rev)
  86.  
  87. #endif /* SharedLibraryDataTarget */
  88.